<template xmlns="http://www.w3.org/1999/html">
  <!--头部-->
  <van-nav-bar
      title="标签"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
      @click-right="onClickRight"
  >
    <template #right>
      <van-icon name="search" size="18"/>
    </template>
  </van-nav-bar>

  <!--中间 跳转各个页面-->
  <div id="content">
    <router-view/>
  </div>

  <!--尾部-->
  <van-tabbar route>
    <van-tabbar-item icon="home-o" to="/" name="index">主页</van-tabbar-item>
    <van-tabbar-item icon="search" to="/team" name="team">队伍</van-tabbar-item>
    <van-tabbar-item icon="friends-o" to="/user" name="user">个人</van-tabbar-item>
  </van-tabbar>

</template>

<script setup>


import {useRouter} from "vue-router";

const router = useRouter();

const onClickLeft = () => {
  router.back();
};
const onClickRight = () => {
  router.push('/search');
}



</script>

<style scoped>
#content {
  padding-bottom: 50px;
}
</style>